import request from '@/utils/request'

export const artGetChannelsService = () => request.get('/my/cate/list')

export const artAddChannelsService = (data) =>
  request.post('/my/cate/add', data)

export const artEditChannelsService = (data) =>
  request.put('/my/cate/info', data)

export const artDelChannelsService = (id) =>
  request.delete(`/my/cate/del?id=${id}`)
// 获取文章列表
export const artGetListService = (params) =>
  request.get('/my/article/list', { params })
// 发布文章
export const artAddService = (data) => request.post('/my/article/add', data)
// 更新文章详情
export const artUpdateService = (data) => request.put('/my/article/info', data)
// 获取文章详情
export const artGetInfoService = (id) =>
  request.get(`/my/article/info?id=${id}`)
// 删除文章
export const artDelService = (id) => request.delete(`/my/article/info?id=${id}`)
